The descriptions in this section merely provide background information related to the present disclosure and may not constitute prior art.
Generally, in video codecs such as MPEG and H.264, video compression is performed in the basic unit of macroblock which has 16 pixels horizontally by 16 pixels vertically. Such macroblocks are respectively subject to an intra or inter prediction for compensating a current macroblock by using information on adjacent pixels neighboring the current macroblock or a previous frame of the current macroblock, and then compressed through a transform of the difference between the image of the current macroblock and the image after the compensation with a subsequent quantization and an entropy encoding. In this process, since there are occasions of image loss during the quantization and the step of referencing the previous image or blocks neighboring the current image may have different images referenced by the respective blocks, a phenomenon of blocking artifact shows boundaries of blocks at each of the units of transform or motion compensation. As the intensity of the quantization gets stronger, such phenomenon becomes more prominent to significantly degrade the video quality.
Therefore, a block encoding needs to reduce the blocking artifact due to the motion compensation and transform by using a means called deblocking filter for smoothing the boundaries between blocks.
The deblocking filter used for H.264 video codec performs the filtering by deciding whether to filter at every boundary of the 4×4 block that is the minimum processing unit. That is, the filtering is not applied to an edge decided but the filtering is carried out upon identifying the blocking artifact not the edge. According to a method of filtering with respective to a macroblock, the deblocking filter is first taken horizontally across the vertical block boundaries as shown in FIG. 1, and then taken vertically across the horizontal block boundaries as shown in FIG. 2.
As illustrated, existing deblocking filters conduct filtering in vertical and horizontal directions only but refrain from the filtering when a block boundary is determined as an edge of the actual image. However, for a diagonal edge other than an edge in the vertical or horizontal direction, there is a problem that a blocking artifact within the diagonal edge at the block boundary cannot be removed.